/**
 *   get ==> params
 *      post ==> data
 * **/ 
import axios from '../../axios'

export const getList = function (url, params) {
    return axios({
        method: 'get',
        url,
        params: params || {}
    })
}

export const addProd = function(url,data){
    return axios({
        method:'post',
        url,
        data
    })
}

export const deletList = function(url , params){
    return axios({
        method: 'get',
        url,
        params:params || {}
    })
}

export const getProdTypes = function(url,params){
    return axios({
        method:'get',
        url,
        params: params || {}
    })
}

export const postEditor = function(url ,data) {
    return axios({
        method:'post',
        url,
        data
    })
}

export const getCtoryNodes = function(url,params){
    return axios({
        method:'get',
        url,
        params: params || {}
    })
}

export const changeNodes = function(url,data) {
    return axios({
        method:'post',
        url,
        data:data || {}
    })
}

export const editorNodes = function(url,data){
    return axios({
        method:'post',
        url,
        data: data || {}
    })
}

export const nodesDelet = function(url,data){
    return axios({
        method:'post',
        url,
        data: data || {}
    })
}

export const addOneNodes = function(url,data){
    return axios({
        method:'post',
        url,
        data:data || {}
    })
}
